#include<iostream>


const int size=10;
class Queue
{
public:
    Queue():front(0),rear(0){};
    void Push(int ele)
    {
        array[rear++]=ele;
        rear%=size;
    }
    void Pop()
    {
        front++;
        front%=size;
    }
    int &GetFront()
    {
        return array[front];
    }


    //判空
    bool IsEmpty()
    {
        return front==rear;

    }
    //队列满了
    bool IsFull()
    {
        return (rear+1)%size==front;
    }

private:
    int array[size];
    int front;//对头
    int rear;//对尾
};


int main()
{
    Queue q;
    for (int i = 0; i < 3; i++)
    {   if(q.IsFull()==true)
    {
        std::cout<<i+1;
        return -1;
    }
        q.Push(i+1);
    }
    while (q.IsEmpty()==false)
    {   
        q.Pop();
    }
    

return 0;


}